package com.ws.system.role.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import com.ws.system.role.entity.SystemRole;
import org.springframework.web.bind.annotation.RestController;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ws.common.result.entity.ResultEntity;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.ws.system.role.service.ISystemRoleService;
import com.ws.common.base.BaseController;

/**
 * <p>
 * 角色 前端控制器
 * </p>
 *
 * @author weifucheng
 * @since 2019-11-11
 */
@RestController
@RequestMapping("/system/role")
public class SystemRoleController extends BaseController<SystemRole> {

    @Autowired
    private ISystemRoleService systemRoleService;

    @RequestMapping("/list")
    public ResultEntity list(SystemRole systemRole, Integer current, Integer size){
        return ResultEntity.succes(systemRoleService.list(systemRole, current, size));
    }

    @RequestMapping("/listByUserId")
    public ResultEntity listByUserId(SystemRole systemRole, Integer current, Integer size){
        return ResultEntity.succes(systemRoleService.listByUserId(systemRole));
    }
}
